<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Embroidermodder: extern/libembroidery/src/encoding.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  extensions: ["tex2jax.js", "TeX/AMSmath.js"],
  jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="logo_embroidermodder_2_0.png"/></td>
  <td id="projectalign">
   <div id="projectname">Embroidermodder<span id="projectnumber">&#160;2.0.0-alpha4</span>
   </div>
   <div id="projectbrief">A free and open source software for machine embroidery</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('encoding_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">encoding.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;math.h&gt;</code><br />
<code>#include &quot;<a class="el" href="embroidery__internal_8h_source.html">embroidery_internal.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a05863b88d4cb505762fa5c5ec4191224"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a05863b88d4cb505762fa5c5ec4191224">write_24bit</a> (FILE *file, int)</td></tr>
<tr class="memdesc:a05863b88d4cb505762fa5c5ec4191224"><td class="mdescLeft">&#160;</td><td class="mdescRight"><em>file</em> <em>x</em>  <a href="encoding_8c.html#a05863b88d4cb505762fa5c5ec4191224">More...</a><br /></td></tr>
<tr class="separator:a05863b88d4cb505762fa5c5ec4191224"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49c180e69d4ac6d46e68b64adb74d7ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="embroidery_8h.html#acde9d757854564332fd795a084ec88b3">EmbColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a49c180e69d4ac6d46e68b64adb74d7ae">embColor_fromHexStr</a> (char *val)</td></tr>
<tr class="memdesc:a49c180e69d4ac6d46e68b64adb74d7ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a 6 digit hex string (I.E. "00FF00") into an EmbColor and returns it.  <a href="encoding_8c.html#a49c180e69d4ac6d46e68b64adb74d7ae">More...</a><br /></td></tr>
<tr class="separator:a49c180e69d4ac6d46e68b64adb74d7ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8b4161c499a38795d7a740300d9e5bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#ad8b4161c499a38795d7a740300d9e5bd">reverse_byte_order</a> (void *b, int bytes)</td></tr>
<tr class="separator:ad8b4161c499a38795d7a740300d9e5bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a4ef6979894437de607ac59967d6691"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a9a4ef6979894437de607ac59967d6691">decode_t01_record</a> (unsigned char b[3], int *x, int *y, int *flags)</td></tr>
<tr class="separator:a9a4ef6979894437de607ac59967d6691"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a185446b8993b1f6a16bca08cc0032cba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a185446b8993b1f6a16bca08cc0032cba">encode_t01_record</a> (unsigned char b[3], int x, int y, int flags)</td></tr>
<tr class="separator:a185446b8993b1f6a16bca08cc0032cba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f2eb7f943597426ecce56ce45c92896"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a6f2eb7f943597426ecce56ce45c92896">encode_tajima_ternary</a> (unsigned char b[3], int x, int y)</td></tr>
<tr class="separator:a6f2eb7f943597426ecce56ce45c92896"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeead1c7cae8d2d87aa74a32f0eeae808"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#aeead1c7cae8d2d87aa74a32f0eeae808">decode_tajima_ternary</a> (unsigned char b[3], int *x, int *y)</td></tr>
<tr class="separator:aeead1c7cae8d2d87aa74a32f0eeae808"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b001600fdee799e57a8ea00e9b73583"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a2b001600fdee799e57a8ea00e9b73583">pfaffEncode</a> (FILE *file, int dx, int dy, int flags)</td></tr>
<tr class="separator:a2b001600fdee799e57a8ea00e9b73583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43cfefba2fb750ffa5eca5b7749b53f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="embroidery_8h.html#a2082be9aabfb541dff1825c4ca6a05cd">EmbReal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a43cfefba2fb750ffa5eca5b7749b53f9">pfaffDecode</a> (unsigned char a1, unsigned char a2, unsigned char a3)</td></tr>
<tr class="separator:a43cfefba2fb750ffa5eca5b7749b53f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a558c902db31be6221139e394313e4a0c"><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a558c902db31be6221139e394313e4a0c">mitEncodeStitch</a> (<a class="el" href="embroidery_8h.html#a2082be9aabfb541dff1825c4ca6a05cd">EmbReal</a> value)</td></tr>
<tr class="memdesc:a558c902db31be6221139e394313e4a0c"><td class="mdescLeft">&#160;</td><td class="mdescRight"><em>value</em>  <a href="encoding_8c.html#a558c902db31be6221139e394313e4a0c">More...</a><br /></td></tr>
<tr class="separator:a558c902db31be6221139e394313e4a0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a896703c85b788f1c46053d826cdd3524"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a896703c85b788f1c46053d826cdd3524">mitDecodeStitch</a> (unsigned char value)</td></tr>
<tr class="memdesc:a896703c85b788f1c46053d826cdd3524"><td class="mdescLeft">&#160;</td><td class="mdescRight"><em>value</em>  <a href="encoding_8c.html#a896703c85b788f1c46053d826cdd3524">More...</a><br /></td></tr>
<tr class="separator:a896703c85b788f1c46053d826cdd3524"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fe39861516c14e3142add13ce9929b1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a1fe39861516c14e3142add13ce9929b1">decodeNewStitch</a> (unsigned char value)</td></tr>
<tr class="memdesc:a1fe39861516c14e3142add13ce9929b1"><td class="mdescLeft">&#160;</td><td class="mdescRight"><em>value</em>  <a href="encoding_8c.html#a1fe39861516c14e3142add13ce9929b1">More...</a><br /></td></tr>
<tr class="separator:a1fe39861516c14e3142add13ce9929b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac14e60a4d0a0fae16f22ccbbb2373e2a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#ac14e60a4d0a0fae16f22ccbbb2373e2a">embInt_read</a> (FILE *f, char *label, void *b, int mode)</td></tr>
<tr class="separator:ac14e60a4d0a0fae16f22ccbbb2373e2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6afc577513abd5034e24efdcbdd7f9f5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="encoding_8c.html#a6afc577513abd5034e24efdcbdd7f9f5">embInt_write</a> (FILE *f, char *label, void *b, int mode)</td></tr>
<tr class="separator:a6afc577513abd5034e24efdcbdd7f9f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >The functions in this file are grouped together to aid the developer's understanding of the similarities between the file formats. This also helps reduce errors between reimplementation of the same idea.</p>
<p >For example: the Tajima ternary encoding of positions is used by at least 4 formats and the only part that changes is the flag encoding. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a9a4ef6979894437de607ac59967d6691" name="a9a4ef6979894437de607ac59967d6691"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a4ef6979894437de607ac59967d6691">&#9670;&nbsp;</a></span>decode_t01_record()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int decode_t01_record </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>b</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p ><em>b</em> <em>x</em> <em>y</em> <em>flags</em> .</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000219">Todo:</a></b></dt><dd>remove the unused return argument. </dd></dl>

</div>
</div>
<a id="aeead1c7cae8d2d87aa74a32f0eeae808" name="aeead1c7cae8d2d87aa74a32f0eeae808"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeead1c7cae8d2d87aa74a32f0eeae808">&#9670;&nbsp;</a></span>decode_tajima_ternary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void decode_tajima_ternary </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>b</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Decode the signed ternary of the tajima format from <em>b</em> to the position values <em>x</em> and <em>y</em>.</p>
<p >There is no return argument. </p>

</div>
</div>
<a id="a1fe39861516c14e3142add13ce9929b1" name="a1fe39861516c14e3142add13ce9929b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fe39861516c14e3142add13ce9929b1">&#9670;&nbsp;</a></span>decodeNewStitch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int decodeNewStitch </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><em>value</em> </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="a49c180e69d4ac6d46e68b64adb74d7ae" name="a49c180e69d4ac6d46e68b64adb74d7ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49c180e69d4ac6d46e68b64adb74d7ae">&#9670;&nbsp;</a></span>embColor_fromHexStr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="embroidery_8h.html#acde9d757854564332fd795a084ec88b3">EmbColor</a> embColor_fromHexStr </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts a 6 digit hex string (I.E. "00FF00") into an EmbColor and returns it. </p>
<p ><em>val</em> 6 byte code describing the color as a hex string, doesn't require null termination. </p><dl class="section return"><dt>Returns</dt><dd>EmbColor the same color as our internal type. </dd></dl>

</div>
</div>
<a id="ac14e60a4d0a0fae16f22ccbbb2373e2a" name="ac14e60a4d0a0fae16f22ccbbb2373e2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac14e60a4d0a0fae16f22ccbbb2373e2a">&#9670;&nbsp;</a></span>embInt_read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void embInt_read </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p ><em>f</em> <em>label</em> <em>b</em> <em>mode</em> </p>
<p >Read and write system for multiple byte types.</p>
<p >The caller passes the function to read/write from, the memory location as a void pointer and a mode identifier that describes the type. This way we can abstract out the endianness of the system running the library and don't have to maintain many functions, just two. </p>

</div>
</div>
<a id="a6afc577513abd5034e24efdcbdd7f9f5" name="a6afc577513abd5034e24efdcbdd7f9f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6afc577513abd5034e24efdcbdd7f9f5">&#9670;&nbsp;</a></span>embInt_write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void embInt_write </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p ><em>f</em> <em>label</em> <em>b</em> <em>mode</em> </p>

</div>
</div>
<a id="a185446b8993b1f6a16bca08cc0032cba" name="a185446b8993b1f6a16bca08cc0032cba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a185446b8993b1f6a16bca08cc0032cba">&#9670;&nbsp;</a></span>encode_t01_record()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void encode_t01_record </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>b</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Encode into bytes <em>b</em> the values of the x-position <em>x</em>, y-position <em>y</em> and the <em>flags</em>. </p>

</div>
</div>
<a id="a6f2eb7f943597426ecce56ce45c92896" name="a6f2eb7f943597426ecce56ce45c92896"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f2eb7f943597426ecce56ce45c92896">&#9670;&nbsp;</a></span>encode_tajima_ternary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int encode_tajima_ternary </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>b</em>[3], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Encode the signed ternary of the tajima format into <em>b</em> the position values <em>x</em> and <em>y</em>.</p>
<p >If the values of <em>x</em> or <em>y</em> fall outside of the valid range of -121 and +121 then it returns 0 and 1. </p>

</div>
</div>
<a id="a896703c85b788f1c46053d826cdd3524" name="a896703c85b788f1c46053d826cdd3524"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a896703c85b788f1c46053d826cdd3524">&#9670;&nbsp;</a></span>mitDecodeStitch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mitDecodeStitch </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><em>value</em> </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="a558c902db31be6221139e394313e4a0c" name="a558c902db31be6221139e394313e4a0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a558c902db31be6221139e394313e4a0c">&#9670;&nbsp;</a></span>mitEncodeStitch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char mitEncodeStitch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="embroidery_8h.html#a2082be9aabfb541dff1825c4ca6a05cd">EmbReal</a>&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><em>value</em> </p>
<dl class="section return"><dt>Returns</dt><dd>unsigned char </dd></dl>

</div>
</div>
<a id="a43cfefba2fb750ffa5eca5b7749b53f9" name="a43cfefba2fb750ffa5eca5b7749b53f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43cfefba2fb750ffa5eca5b7749b53f9">&#9670;&nbsp;</a></span>pfaffDecode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="embroidery_8h.html#a2082be9aabfb541dff1825c4ca6a05cd">EmbReal</a> pfaffDecode </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>a1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>a2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>a3</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Decode the bytes <em>a1</em>, <em>a2</em> and <em>a3</em> . Returns the EmbReal floating-point value. </p>

</div>
</div>
<a id="a2b001600fdee799e57a8ea00e9b73583" name="a2b001600fdee799e57a8ea00e9b73583"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b001600fdee799e57a8ea00e9b73583">&#9670;&nbsp;</a></span>pfaffEncode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pfaffEncode </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p ><em>file</em> <em>dx</em> <em>dy</em> <em>flags</em> </p>

</div>
</div>
<a id="ad8b4161c499a38795d7a740300d9e5bd" name="ad8b4161c499a38795d7a740300d9e5bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8b4161c499a38795d7a740300d9e5bd">&#9670;&nbsp;</a></span>reverse_byte_order()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void reverse_byte_order </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p >Reverses the byte order of <em>bytes</em> number of bytes at memory location <em>b</em>. Only works for 2 or 4 byte arrays. </p>

</div>
</div>
<a id="a05863b88d4cb505762fa5c5ec4191224" name="a05863b88d4cb505762fa5c5ec4191224"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05863b88d4cb505762fa5c5ec4191224">&#9670;&nbsp;</a></span>write_24bit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void write_24bit </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><em>file</em> <em>x</em> </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_dc9e1e299a0b26f222fe6c0a872463f0.html">extern</a></li><li class="navelem"><a class="el" href="dir_6a8aa8af2875e58e82a0145491f7a8e2.html">libembroidery</a></li><li class="navelem"><a class="el" href="dir_50a7dc5dba8160ac8332d90912e622db.html">src</a></li><li class="navelem"><a class="el" href="encoding_8c.html">encoding.c</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
  </ul>
</div>
</body>
</html>
